Skip to content

Simplify setStatus implementation in run. NFC#27121

Open
sbc100 wants to merge 1 commit into
emscripten-core:mainfrom
sbc100:setStatus
Open

Simplify setStatus implementation in run. NFC#27121
sbc100 wants to merge 1 commit into
emscripten-core:mainfrom
sbc100:setStatus

Conversation

@sbc100

@sbc100 sbc100 commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Note: The codesize costs here only apply to builds that include setStatus in INCOMING_MODULE_JS_API, so don't apply to builds that really care about code size (i.e. when -sINCOMING_MODULE_JS_API=[] is used).

@brendandahl

Copy link
Copy Markdown
Collaborator

Pretty much all the code size tests get worse. Are we not testing with sINCOMING_MODULE_JS_API=[] ?

@sbc100

sbc100 commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator Author

Pretty much all the code size tests get worse. Are we not testing with sINCOMING_MODULE_JS_API=[] ?

A lot of the codesize tests do use -sINCOMING_MODULE_JS_API=[] yes.

For example all of the test_minimal_runtime_code_size tests (because they use -sSTRICT). This is why you only see some of the codesize tests regress here.

@sbc100 sbc100 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More code simplification... way nicer now. But still sadly a codesize regression :(

@sbc100 sbc100 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simplified again.. now the regression is only 11 bytes compressed.

@sbc100 sbc100 left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simplified more.. can't quite remove the regression though.

The codesize costs here only apply to builds that include
`setStatus` in `INCOMING_MODULE_JS_API`, so don't apply to builds
that really care about code size (i.e. when
`-sINCOMING_MODULE_JS_API=[]` is used).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants